home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / library / reqtlsdv.lha / ReqTools / Glue / PCQ / pcq_glue.lha / ReqTools.x < prev    next >
Text File  |  1992-09-14  |  26KB  |  826 lines

  1. External;
  2.  
  3. {
  4.  
  5.     ReqTools V38 external file
  6.  
  7.     Compiles under PCQ Pascal 1.2d
  8.  
  9.     Translated from Gunter Indenhoek's HSPascal interface v1.2 to work
  10.     in PCQ Pascal by Chris Pressey, Sept 12 1992
  11.  
  12.     Original comment block follows :
  13.  
  14. }
  15. {        ReqTools (V38) interface for HSPascal         }
  16. {                                                      }
  17. { ReqTools is (C) Copyright 1991/1992 by Nico François }
  18. {                                                      }
  19. {  HSPascal interface v1.2 © 1992 by Gunter Indenhoek  }
  20.  
  21. {
  22.  
  23.     To create the .o file :
  24.  
  25.     pascal reqtools.x reqtools.asm
  26.     a68k reqtools.asm reqtools.o
  27.  
  28.     To use the .o file :
  29.  
  30.     {$I "reqtools.i"} in your program
  31.     compiler your program to assembly
  32.     assemble your program
  33.     blink your_program.o reqtools.o TO your_program lib pcq.lib
  34.  
  35. }
  36.  
  37. {$I "Utility.i"}
  38. {$I "Include:Intuition/Intuition.i"}
  39. {$I "include:libraries/dos.i"}
  40. {$I "Include:Exec/Memory.i"}
  41. {$I "Include:Exec/Interrupts.i"}
  42. {$I "Include:Exec/Libraries.i"}
  43. {$I "Include:Exec/Ports.i"}
  44. {$I "Include:Exec/IO.i"}
  45. {$I "Include:Exec/Devices.i"}
  46.  
  47. Const
  48.     
  49.     REQTOOLSNAME = "reqtools.library";
  50.     REQTOOLSVERSION = 38;
  51.  
  52. Type
  53.  
  54. { array to pass your arguments to EZRequestA() }
  55.  
  56.     argarray = array[0..31] of Integer;
  57.  
  58. { array to pass your flags to reqtools-requesters }
  59.  
  60.     ReqTagList = array[0..32] of TagItem;
  61.     ReqTagListPtr = ^ReqTagList;
  62.  
  63. { library - base }
  64.  
  65.     ReqToolsBase = Record
  66.                    Lib_Node : LibraryPtr;
  67.                    Flags    : Byte;
  68.                    Pad      : Array[0..3] of Byte;
  69.                    SegList  : BPTR;
  70.  
  71.                    { The following library bases may be read and used by your program }
  72.  
  73.                    IntuitionBase: LibraryPtr;
  74.                    GfxBase  : LibraryPtr;
  75.                    DOSBase  : LibraryPtr;
  76.  
  77.                    { Next two library bases are only (and always) valid on Kickstart 2.0!
  78.                      (1.3 version of reqtools also initializes these when run on 2.0) }
  79.  
  80.                    GadToolsBase : LibraryPtr;
  81.                    UtilityBase  : LibraryPtr;
  82.                    end;
  83.     ReqToolsBasePtr = ^ReqToolsBase;
  84.  
  85. Const
  86.  
  87. { types of requesters, for rtAllocRequestA() }
  88.  
  89.     RT_FILEREQ = 0;
  90.     RT_REQINFO = 1;
  91.     RT_FONTREQ = 2;
  92.     { (V38) }
  93.     RT_SCREENMODEREQ = 3;
  94.  
  95. {***********************
  96. *                      *
  97. *    File requester    *
  98. *                      *
  99. ***********************}
  100.  
  101. type
  102.  
  103. { structure _MUST_ be allocated with rtAllocRequest() }
  104.  
  105.     rtFileRequester  = Record
  106.                        ReqPos      : Integer;
  107.                        LeftOffset  : Short;
  108.                        TopOffset   : Short;
  109.                        Flags       : Integer;
  110.  
  111.         { OBSOLETE IN V38! DON'T USE! } Hook: HookPtr;
  112.  
  113.                        Dir         : String;     { READ ONLY! Change with rtChangeReqAttrA()! }
  114.                        MatchPat    : String;     { READ ONLY! Change with rtChangeReqAttrA()! }
  115.                        DefaultFont : TextFontPtr;
  116.                        WaitPointer : Integer;
  117.                        { (V38) }
  118.                        LockWindow  : Integer;
  119.                        ShareIDCMP  : Integer;
  120.                        IntuiMsgFunc: HookPtr;
  121.                        reserved1   : Short;
  122.                        reserved2   : Short;
  123.                        reserved3   : Short;
  124.                        ReqHeight   : Short;     { READ ONLY! Use RTFI_Height tag! }
  125.                        { Private data follows! HANDS OFF }
  126.                        end;
  127.     rtFileRequesterPtr = ^rtFileRequester;
  128.  
  129. { returned by rtFileRequestA() if multiselect is enabled,
  130.   free list with rtFreeFileList() }
  131.  
  132.     rtFileList = Record
  133.         Next    : ^rtFileList;
  134.         StrLen  : Integer;        { -1 for directories }
  135.         Name    : String;
  136.         end;
  137.     rtFileListPtr = ^rtFileList;
  138.  
  139. {***********************
  140. *                      *
  141. *    Font requester    *
  142. *                      *
  143. ***********************}
  144.  
  145. { structure _MUST_ be allocated with rtAllocRequest() }
  146.  
  147.     rtFontRequester = Record
  148.                       ReqPos        : Integer;
  149.                       LeftOffset    : Short;
  150.                       TopOffset     : Short;
  151.                       Flags         : Integer;
  152.                       { OBSOLETE IN V38! DON'T USE! } Hook: HookPtr;
  153.                       Attr          : TextAttr; { READ ONLY! }
  154.                       DefaultFont   : TextFontPtr;
  155.                       WaitPointer   : Integer;
  156.                       { (V38) }
  157.                       LockWindow    : Integer;
  158.                       ShareIDCMP    : Integer;
  159.                       IntuiMsgFunc  : HookPtr;
  160.                       reserved1     : Short;
  161.                       reserved2     : Short;
  162.                       reserved3     : Short;
  163.                       ReqHeight     : Short; { READ ONLY!  Use RTFO_Height tag! }
  164.                       { Private data follows! HANDS OFF }
  165.                       end;
  166.     rtFontRequesterPtr = ^rtFontRequester;
  167.  
  168. {*************************
  169. *                        *
  170. *  ScreenMode requester  *
  171. *                        *
  172. *************************}
  173.  
  174. { structure _MUST_ be allocated with rtAllocRequest() }
  175.  
  176.     rtScreenModeRequester = Record
  177.                             ReqPos      : Integer;
  178.                             LeftOffset  : Short;
  179.                             TopOffset   : Short;
  180.                             Flags       : Integer;
  181.                             private1    : Integer;
  182.                             DisplayID   : Integer;  { READ ONLY! }
  183.                             DisplayWidth: Short;    { READ ONLY! }
  184.                             DisplayHeight: Short;   { READ ONLY! }
  185.                             DefaultFont : TextFontPtr;
  186.                             WaitPointer : Integer;
  187.                             LockWindow  : Integer;
  188.                             ShareIDCMP  : Integer;
  189.                             IntuiMsgFunc: HookPtr;
  190.                             reserved1   : Short;
  191.                             reserved2   : Short;
  192.                             reserved3   : Short;
  193.                             ReqHeight   : Short;    { READ ONLY!  Use RTSC_Height tag! }
  194.                             DisplayDepth: Short;    { READ ONLY! }
  195.                             OverscanType: Short;    { READ ONLY! }
  196.                             AutoScroll  : Integer;  { READ ONLY! }
  197.                             { Private data follows! HANDS OFF }
  198.                             end;
  199.     rtScreenModeRequesterPtr = ^rtScreenModeRequester;
  200.  
  201. {***********************
  202. *                      *
  203. *    Requester Info    *
  204. *                      *
  205. ***********************}
  206.  
  207. { for rtEZRequestA(), rtGetLongA(), rtGetStringA() and rtPaletteRequestA(),
  208.    _MUST_ be allocated with rtAllocRequest() }
  209.  
  210.     rtReqInfo = Record
  211.                 ReqPos      : Integer;
  212.                 LeftOffset  : Short;
  213.                 TopOffset   : Short;
  214.                 Width       : Integer;        { not for rtEZRequestA() }
  215.                 ReqTitle    : String;         { currently only for rtEZRequestA() }
  216.                 Flags       : Integer;        { currently only for rtEZRequestA() }
  217.                 DefaultFont : TextFontPtr;    { currently only for rtPaletteRequestA() }
  218.                 WaitPointer : Integer;
  219.                 { (V38) }
  220.                 LockWindow  : Integer;
  221.                 ShareIDCMP  : Integer;
  222.                 IntuiMsgFunc: HookPtr;
  223.                 { structure may be extended in future }
  224.                 end;
  225.     rtReqInfoPtr = ^rtReqInfo;
  226.  
  227. {***********************
  228. *                      *
  229. *     Handler Info     *
  230. *                      *
  231. ***********************}
  232.  
  233. { for rtReqHandlerA(), will be allocated for you when you use
  234.    the RT_ReqHandler tag, never try to allocate this yourself! }
  235.  
  236.     rtHandlerInfo = Record
  237.                     private1  : Integer;
  238.                     WaitMask  : Integer;
  239.                     DoNotWait : Integer;
  240.                    { Private data follows, HANDS OFF }
  241.                     end;
  242.     rtHandlerInfoPtr = ^rtHandlerInfo;
  243.  
  244. Const
  245.  
  246. { possible return codes from rtReqHandlerA() }
  247.  
  248.     CALL_HANDLER = $80000000;
  249.  
  250. {*************************************
  251. *                                    *
  252. *                TAGS                *
  253. *                                    *
  254. *************************************}
  255.  
  256.     RT_TagBase = TAG_USER;
  257.  
  258. { *** tags understood by most requester functions *** }
  259.  
  260. RT_Window       = $80000001; { Optional pointer to window }
  261. RT_IDCMPFlags   = $80000002; { idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED) }
  262. RT_ReqPos       = $80000003; { position of requester window (see below) - default REQPOS_POINTER }
  263. RT_LeftOffset   = $80000004; { signal mask to wait for abort signal }
  264. RT_TopOffset    = $80000005; { topedge offset of requester relative to position specified by RT_ReqPos }
  265. RT_PubScrName   = $80000006; { name of public screen to put requester on (Kickstart 2.0 only!) }
  266. RT_Screen       = $80000007; { address of screen to put requester on }
  267. RT_ReqHandler   = $80000008; { tagdata must hold the address of (!) an APTR variable }
  268. RT_DefaultFont  = $80000009; { font to use when screen font is rejected, _MUST_ be fixed-width font! pTextFont , not pTextAttr ) - default GfxBase^.DefaultFont }
  269.  
  270. RT_WaitPointer  = $8000000A; { boolean to set the standard wait pointer in window - default FALSE }
  271. RT_Underscore   = $8000000B; { (V38) char preceding keyboard shortcut characters (will be underlined) }
  272. RT_ShareIDCMP   = $8000000C; { (V38) share IDCMP port with window - default FALSE }
  273. RT_LockWindow   = $8000000D; { (V38) lock window and set standard wait pointer - default FALSE }
  274. RT_ScreenToFront= $8000000E; { (V38) boolean to make requester's screen pop to front - default TRUE }
  275. RT_TextAttr     = $8000000F; { (V38) Requester should use this font - default: screen font }
  276. RT_IntuiMsgFunc = $80000010; { (V38) call this hook for every IDCMP message not for requester }
  277. RT_Locale       = $80000011; { (V38) Locale ReqTools should use for text }
  278.  
  279. { *** tags specific to rtEZRequestA *** }
  280. RTEZ_ReqTitle   = $80000014; { title of requester window - english default "Request" or "Information" }
  281.                              { ($80000015) reserved }
  282. RTEZ_Flags      = $80000016; { various flags (see below) }
  283. RTEZ_DefaultResponse
  284.                 = $80000017; { default response (activated by pressing RETURN) - default TRUE }
  285.  
  286.  
  287. { *** tags specific to rtGetLongA *** }
  288. RTGL_Min        = $8000001E; { minimum allowed value - default MININT }
  289. RTGL_Max        = $8000001F; { maximum allowed value - default MAXINT }
  290. RTGL_Width      = $80000020; { suggested width of requester window (in pixels) }
  291. RTGL_ShowDefault= $80000021; { boolean to show the default value - default TRUE }
  292. RTGL_GadFmt     = $80000022; { (V38) string with possible responses - english default " _Ok |_Cancel" }
  293. RTGL_GadFmtArgs = $80000023; { (V38) optional arguments for RTGL_GadFmt }
  294. RTGL_Invisible  = $80000024; { (V38) invisible typing - default FALSE }
  295. RTGL_Backfill   = $80000025; { (V38) window backfill - default TRUE }
  296. RTGL_TextFmt    = $80000026; { (V38) optional text above gadget }
  297. RTGL_TextFmtArgs= $80000027; { (V38) optional arguments for RTGS_TextFmt }
  298. RTGL_Flags = RTEZ_Flags;     { (V38) various flags (see below) }
  299.  
  300.  
  301. { *** tags specific to rtGetStringA *** }
  302. RTGS_Width      = RTGL_Width;       { suggested width of requester window (in pixels) }
  303. RTGS_AllowEmpty = $80000050;        { allow empty string to be accepted - default FALSE }
  304. RTGS_GadFmt     = RTGL_GadFmt;      { (V38) string with possible responses - english default " _Ok |_Cancel" }
  305. RTGS_GadFmtArgs = RTGL_GadFmtArgs;  { (V38) optional arguments for RTGS_GadFmt }
  306. RTGS_Invisible  = RTGL_Invisible;   { (V38) invisible typing - default FALSE }
  307. RTGS_Backfill   = RTGL_Backfill;    { (V38) window backfill - default TRUE }
  308. RTGS_TextFmt    = RTGL_TextFmt;     { (V38) optional text above gadget }
  309. RTGS_TextFmtArgs= RTGL_TextFmtArgs; { (V38) optional arguments for RTGS_TextFmt }
  310. RTGS_Flags      = RTEZ_Flags;       { (V38) various flags (see below) }
  311.  
  312.  
  313. { *** tags specific to rtFileRequestA *** }
  314. RTFI_Flags      = $80000028; { various flags (see below) }
  315. RTFI_Height     = $80000029; { suggested height of file requester }
  316. RTFI_OkText     = $8000002A; { replacement text for 'Ok' gadget (max 6 chars) }
  317. RTFI_VolumeRequest=$8000002B;{ (V38) bring up volume requester, tag data holds flags (see below) }
  318. RTFI_FilterFunc = $8000002C; { (V38) call this hook for every file in the directory }
  319. RTFI_AllowEmpty = $8000002D; { (V38) allow empty file to be accepted - default FALSE }
  320.  
  321.  
  322. { *** tags specific to rtFontRequestA *** }
  323. RTFO_Flags      = RTFI_Flags;  { various flags (see below) }
  324. RTFO_Height     = RTFI_Height; { suggested height of font requester }
  325. RTFO_OkText     = RTFI_OkText; { replacement text for 'Ok' gadget (max 6 chars) }
  326. RTFO_SampleHeight=$8000003C;   { suggested height of font sample display - default 24 }
  327. RTFO_MinHeight  = $8000003D;   { minimum height of font displayed }
  328. RTFO_MaxHeight  = $8000003E;   { maximum height of font displayed }
  329. { [($8000003F) to ($80000042) used below] }
  330. RTFO_FilterFunc = RTFI_FilterFunc;{ (V38) call this hook for every font }
  331.  
  332.  
  333. { *** (V38) tags for rtScreenModeRequestA *** }
  334. RTSC_Flags         = RTFI_Flags;{ various flags (see below) }
  335. RTSC_Height        = RTFI_Height;{ suggested height of screenmode requester }
  336. RTSC_OkText        = RTFI_OkText;{ replacement text for 'Ok' gadget (max 6 chars) }
  337. RTSC_PropertyFlags = $8000005A;{ property flags (see also RTSC_PropertyMask) }
  338. RTSC_PropertyMask  = $8000005B;{ property mask - default all bits in RTSC_PropertyFlags considered }
  339. RTSC_MinWidth      = $8000005C;{ minimum display width allowed }
  340. RTSC_MaxWidth      = $8000005D;{ maximum display width allowed }
  341. RTSC_MinHeight     = $8000005E;{ minimum display height allowed }
  342. RTSC_MaxHeight     = $8000005F;{ maximum display height allowed }
  343. RTSC_MinDepth      = $80000060;{ minimum display depth allowed }
  344. RTSC_MaxDepth      = $80000061;{ maximum display depth allowed }
  345. RTSC_FilterFunc    = RTFI_FilterFunc;{ call this hook for every display mode id }
  346.  
  347.  
  348. { *** tags for rtChangeReqAttrA *** }
  349. RTFI_Dir = $80000032;{ file requester - set directory }
  350. RTFI_MatchPat = $80000033;{ file requester - set wildcard pattern }
  351. RTFI_AddEntry = $80000034;{ file requester - add a file or directory to the buffer }
  352. RTFI_RemoveEntry = $80000035;{ file requester - remove a file or directory from the buffer }
  353. RTFO_FontName = $8000003F;{ font requester - set font name of selected font }
  354. RTFO_FontHeight = $80000040;{ font requester - set font size }
  355. RTFO_FontStyle = $80000041;{ font requester - set font style }
  356. RTFO_FontFlags = $80000042;{ font requester - set font flags }
  357. RTSC_ModeFromScreen = $80000050;{ (V38) screenmode requester - get display attributes from screen }
  358. RTSC_DisplayID = $80000051;{ (V38) screenmode requester - set display mode id (32-bit extended) }
  359. RTSC_DisplayWidth = $80000052;{ (V38) screenmode requester - set display width }
  360. RTSC_DisplayHeight = $80000053;{ (V38) screenmode requester - set display height }
  361. RTSC_DisplayDepth = $80000054;{ (V38) screenmode requester - set display depth }
  362. RTSC_OverscanType = $80000055;{ (V38) screenmode requester - set overscan type, 0 for regular size }
  363. RTSC_AutoScroll = $80000056;{ (V38) screenmode requester - set autoscroll }
  364.  
  365.  
  366. { *** tags for rtPaletteRequestA *** }
  367. { initially selected color - default 1 }
  368.     RTPA_Color = $80000046;
  369.  
  370. { *** tags for rtReqHandlerA *** }
  371. { end requester by software control, set tagdata to REQ_CANCEL, REQ_OK or
  372.   in case of rtEZRequest to the return value }
  373.     RTRH_EndRequest = $800003C;
  374.  
  375. { *** tags for rtAllocRequestA *** }
  376. { no tags defined yet }
  377.  
  378. {************
  379. * RT_ReqPos *
  380. ************}
  381.     REQPOS_POINTER = 0;
  382.     REQPOS_CENTERWIN = 1;
  383.     REQPOS_CENTERSCR = 2;
  384.     REQPOS_TOPLEFTWIN = 3;
  385.     REQPOS_TOPLEFTSCR = 4;
  386.     
  387. {******************
  388. * RTRH_EndRequest *
  389. ******************}
  390.     REQ_CANCEL = 0;
  391.     REQ_OK = 1;
  392.  
  393. {***************************************
  394. * flags for RTFI_Flags and RTFO_Flags  *
  395. * or filereq->Flags and fontreq->Flags *
  396. ***************************************}
  397.     FREQB_NOBUFFER = 2;
  398.     FREQF_NOBUFFER = 4;
  399.  
  400. {*****************************************
  401. * flags for RTFI_Flags or filereq->Flags *
  402. *****************************************}
  403.     FREQB_MULTISELECT = 0;
  404.     FREQF_MULTISELECT = 1;
  405.     FREQB_SAVE = 1;
  406.     FREQF_SAVE = 2;
  407.     FREQB_NOFILES = 3;
  408.     FREQF_NOFILES = 8;
  409.     FREQB_PATGAD = 4;
  410.     FREQF_PATGAD = 16;
  411.     FREQB_SELECTDIRS = 12;
  412.     FREQF_SELECTDIRS = 4096;
  413.  
  414. {*****************************************
  415. * flags for RTFO_Flags or fontreq->Flags *
  416. *****************************************}
  417.     FREQB_FIXEDWIDTH = 5;
  418.     FREQF_FIXEDWIDTH = 32;
  419.     FREQB_COLORFONTS = 6;
  420.     FREQF_COLORFONTS = 64;
  421.     FREQB_CHANGEPALETTE = 7;
  422.     FREQF_CHANGEPALETTE = 128;
  423.     FREQB_LEAVEPALETTE = 8;
  424.     FREQF_LEAVEPALETTE = 256;
  425.     FREQB_SCALE = 9;
  426.     FREQF_SCALE = 512;
  427.     FREQB_STYLE = 10;
  428.     FREQF_STYLE = 1024;
  429.  
  430. {*****************************************************
  431. * (V38) flags for RTSC_Flags or screenmodereq->Flags *
  432. *****************************************************}
  433.     SCREQB_SIZEGADS = 13;
  434.     SCREQF_SIZEGADS = 8192;
  435.     SCREQB_DEPTHGAD = 14;
  436.     SCREQF_DEPTHGAD = 16384;
  437.     SCREQB_NONSTDMODES = 15;
  438.     SCREQF_NONSTDMODES = 32768;
  439.     SCREQB_GUIMODES = 16;
  440.     SCREQF_GUIMODES = 65536;
  441.     SCREQB_AUTOSCROLLGAD = 18;
  442.     SCREQF_AUTOSCROLLGAD = 262144;
  443.     SCREQB_OVERSCANGAD = 19;
  444.     SCREQF_OVERSCANGAD = 524288;
  445.  
  446. {*****************************************
  447. * flags for RTEZ_Flags or reqinfo->Flags *
  448. *****************************************}
  449.     EZREQB_NORETURNKEY = 0;
  450.     EZREQF_NORETURNKEY = 1;
  451.     EZREQB_LAMIGAQUAL = 1;
  452.     EZREQF_LAMIGAQUAL = 2;
  453.     EZREQB_CENTERTEXT = 2;
  454.     EZREQF_CENTERTEXT = 4;
  455.  
  456. {***********************************************
  457. * (V38) flags for RTGL_Flags or reqinfo->Flags *
  458. ***********************************************}
  459.     GLREQB_CENTERTEXT = EZREQB_CENTERTEXT;
  460.     GLREQF_CENTERTEXT = EZREQF_CENTERTEXT;
  461.     GLREQB_HIGHLIGHTTEXT = 3;
  462.     GLREQF_HIGHLIGHTTEXT = 8;
  463.  
  464. {***********************************************
  465. * (V38) flags for RTGS_Flags or reqinfo->Flags *
  466. ***********************************************}
  467.     GSREQB_CENTERTEXT = EZREQB_CENTERTEXT;
  468.     GSREQF_CENTERTEXT = EZREQF_CENTERTEXT;
  469.     GSREQB_HIGHLIGHTTEXT = GLREQB_HIGHLIGHTTEXT;
  470.     GSREQF_HIGHLIGHTTEXT = GLREQF_HIGHLIGHTTEXT;
  471.  
  472. {*****************************************
  473. * (V38) flags for RTFI_VolumeRequest tag *
  474. *****************************************}
  475.     VREQB_NOASSIGNS=0;
  476.     VREQF_NOASSIGNS=1;
  477.     VREQB_NODISKS=1;
  478.     VREQF_NODISKS=2;
  479.     VREQB_ALLDISKS=2;
  480.     VREQF_ALLDISKS=4;
  481.  
  482. {*
  483.    Following things are obsolete in ReqTools V38.
  484.    DON'T USE THESE IN NEW CODE!
  485. *}
  486.     REQHOOK_WILDFILE=0;
  487.     REQHOOK_WILDFONT=1;
  488.     FREQB_DOWILDFUNC=11;
  489.     FREQF_DOWILDFUNC=2048;
  490.  
  491.  
  492. {************
  493. * Functions *
  494. ************}
  495.  
  496. Var
  497.   RTBase: ReqToolsBasePtr;
  498.  
  499. Function rtAllocRequestA
  500.          (type_: Integer;
  501.           taglist: ReqTagListPtr): Integer;
  502.  
  503. begin
  504. {$A move.l    a6,-(sp)      ; push a6 onto the stack
  505.     lea       $8(sp),a6     ; a6 := 8 bytes before the stack pointer
  506.     move.l    (a6)+,a0      ; move a6 into a0 and increment a6
  507.     move.l    (a6)+,d0      ; move a6 into d0 and increment a6
  508.     move.l    _RTBase,a6    ; move the library base ptr intto a6
  509.     jsr       -$1E(a6)      ; jump to the routine at -$1E in reqtools
  510.     move.l    d0,$10(sp)    ; put the return value from the fcn on the stack
  511.     move.l    (sp)+,a6      ; pop the old a6 off the stack
  512. }
  513. END;
  514.  
  515. Function rtFreeRequest (req: Address): Integer;
  516.  
  517. begin
  518. {$A move.l    a6,-(sp)
  519.     move.l    $8(sp),a1
  520.     move.l    _RTBase,a6
  521.     jsr       -$24(a6)
  522.     move.l    d0,$C(sp)
  523.     move.l    (sp)+,a6}
  524. END;
  525.  
  526. Function rtFreeReqBuffer (req: Address): Integer;
  527.  
  528. begin
  529. {$A move.l    a6,-(sp)
  530.     move.l    $8(sp),a1
  531.     move.l    _RTBase,a6
  532.     jsr       -$2A(a6)
  533.     move.l    d0,$C(sp)
  534.     move.l    (sp)+,a6}
  535. END;
  536.  
  537. Function rtChangeReqAttrA
  538.          (req: Address;
  539.           taglist: ReqTagListPtr): Integer;
  540.  
  541. begin
  542. {$A move.l    a6,-(sp)
  543.     movem.l    $8(sp),a0-a1
  544.     move.l    _RTBase,a6
  545.     jsr       -$30(a6)
  546.     move.l    d0,$10(sp)
  547.     move.l    (sp)+,a6}
  548. END;
  549.  
  550. Function rtFileRequestA
  551.          (filereq:rtFileRequesterPtr;
  552.           file_: String;
  553.           title: String;
  554.           taglist: ReqTagListPtr): Integer;
  555.  
  556. begin
  557. {$A movem.l   a2-a3/a6,-(sp)
  558.     lea       $10(sp),a6
  559.     move.l    (a6)+,a0
  560.     move.l    (a6)+,a3
  561.     move.l    (a6)+,a2
  562.     move.l    (a6)+,a1
  563.     move.l    _RTBase,a6
  564.     jsr       -$36(a6)
  565.     move.l    d0,$20(sp)
  566.     movem.l   (sp)+,a2-a3/a6}
  567. END;
  568.  
  569. Function rtFreeFileList (filelist: rtFileListPtr): Integer;
  570.  
  571. begin
  572. {$A move.l    a6,-(sp)
  573.     move.l    $8(sp),a0
  574.     move.l    _RTBase,a6
  575.     jsr       -$3C(a6)
  576.     move.l    d0,$C(sp)
  577.     move.l    (sp)+,a6 }
  578. END;
  579.  
  580. Function rtEZRequestA
  581.          (bodyfmt:String;
  582.           gadfmt: String;
  583.           reqinfo: rtReqInfoPtr;
  584.           argarray: Address;
  585.           taglist: ReqTagListPtr): Integer;
  586.  
  587. begin
  588. {$A movem.l   a2-a4/a6,-(sp)
  589.     lea       $14(sp),a6
  590.     move.l    (a6)+,a0
  591.     move.l    (a6)+,a4
  592.     move.l    (a6)+,a3
  593.     move.l    (a6)+,a2
  594.     move.l    (a6)+,a1
  595.     move.l    _RTBase,a6
  596.     jsr       -$42(a6)
  597.     move.l    d0,$28(sp)
  598.     movem.l   (sp)+,a2-a4/a6}
  599. END;
  600.  
  601. Function rtGetStringA
  602.          (buffer: String;
  603.           maxchars: Integer;
  604.           title: String;
  605.           reqinfo: rtReqInfoPtr;
  606.           taglist: ReqTagListPtr): Integer;
  607.  
  608. begin
  609. {$A movem.l   a2-a3/a6,-(sp)
  610.     lea       $10(sp),a6
  611.     move.l    (a6)+,a0
  612.     move.l    (a6)+,a3
  613.     move.l    (a6)+,a2
  614.     move.l    (a6)+,d0
  615.     move.l    (a6)+,a1
  616.     move.l    _RTBase,a6
  617.     jsr       -$48(a6)
  618.     move.l    d0,$24(sp)
  619.     movem.l   (sp)+,a2-a3/a6}
  620. END;
  621.  
  622. Function rtGetLongA
  623.          (longptr:Address;
  624.           title:String;
  625.           reqinfo:rtReqInfoPtr;
  626.           taglist: ReqTagListPtr): Integer;
  627.  
  628. begin
  629. {$A movem.l   a2-a3/a6,-(sp)
  630.     lea       $10(sp),a6
  631.     move.l    (a6)+,a0
  632.     move.l    (a6)+,a3
  633.     move.l    (a6)+,a2
  634.     move.l    (a6)+,a1
  635.     move.l    _RTBase,a6
  636.     jsr       -$4E(a6)
  637.     move.l    d0,$20(sp)
  638.     movem.l   (sp)+,a2-a3/a6}
  639. END;
  640.  
  641. Function rtFontRequestA
  642.          (fontreq:rtFontRequesterPtr;
  643.           title: String;
  644.           taglist: ReqTagListPtr): Integer;
  645.  
  646. begin
  647. {$A movem.l   a3/a6,-(sp)
  648.     lea       $C(sp),a6
  649.     move.l    (a6)+,a0
  650.     move.l    (a6)+,a3
  651.     move.l    (a6)+,a1
  652.     move.l    _RTBase,a6
  653.     jsr       -$60(a6)
  654.     move.l    d0,$18(sp)
  655.     movem.l   (sp)+,a3/a6}
  656. END;
  657.  
  658. Function rtPaletteRequestA
  659.          (title:String;
  660.           reqinfo: rtReqInfoPtr;
  661.           taglist: ReqTagListPtr): Integer;
  662.  
  663. begin
  664. {$A movem.l   a2-a3/a6,-(sp)
  665.     lea       $10(sp),a6
  666.     move.l    (a6)+,a0
  667.     move.l    (a6)+,a3
  668.     move.l    (a6)+,a2
  669.     move.l    _RTBase,a6
  670.     jsr       -$66(a6)
  671.     move.l    d0,$1C(sp)
  672.     movem.l   (sp)+,a2-a3/a6}
  673. END;
  674.  
  675. Function rtReqHandlerA
  676.          (handlerinfo: rtHandlerInfoPtr;
  677.           sigs: Integer;
  678.           taglist: ReqTagListPtr): Integer;
  679.  
  680. begin
  681. {$A move.l    a6,-(sp)
  682.     lea       $8(sp),a6
  683.     move.l    (a6)+,a0
  684.     move.l    (a6)+,d0
  685.     move.l    (a6)+,a1
  686.     move.l    _RTBase,a6
  687.     jsr       -$6C(a6)
  688.     move.l    d0,$14(sp)
  689.     move.l    (sp)+,a6}
  690. END;
  691.  
  692. Function rtSetWaitPointer (window: WindowPtr): Integer;
  693.  
  694. begin
  695. {$A move.l    a6,-(sp)
  696.     move.l    $8(sp),a0
  697.     move.l    _RTBase,a6
  698.     jsr       -$72(a6)
  699.     move.l    d0,$C(sp)
  700.     move.l    (sp)+,a6}
  701. END;
  702.  
  703. Function rtGetVScreenSize
  704.          (screen: ScreenPtr;
  705.           widthptr,
  706.           heightptr: Address): Integer;
  707.  
  708. begin
  709. {$A movem.l    a2/a6,-(sp)
  710.     lea       $C(sp),a6
  711.     move.l    (a6)+,a2
  712.     move.l    (a6)+,a1
  713.     move.l    (a6)+,a0
  714.     move.l    _RTBase,a6
  715.     jsr       -$78(a6)
  716.     move.l    d0,$18(sp)
  717.     movem.l   (sp)+,a2/a6}
  718. END;
  719.  
  720. Function rtSetReqPosition
  721.          (reqpos: Integer;
  722.           newwindow: NewWindowPtr;
  723.           screen: ScreenPtr;
  724.           window: WindowPtr): Integer;
  725.  
  726. begin
  727. {$A movem.l   a2/a6,-(sp)
  728.     lea       $C(sp),a6
  729.     move.l    (a6)+,a2
  730.     move.l    (a6)+,a1
  731.     move.l    (a6)+,a0
  732.     move.l    (a6)+,d0
  733.     move.l    _RTBase,a6
  734.     jsr       -$7E(a6)
  735.     move.l    d0,$1C(sp)
  736.     movem.l   (sp)+,a2/a6}
  737. END;
  738.  
  739. Function rtSpread
  740.          (posarray,
  741.           sizearray: Address;
  742.           length,
  743.           min,
  744.           max,
  745.           num: Integer): Integer;
  746.  
  747. begin
  748. {$A movem.l   d3/a6,-(sp)
  749.     lea       $C(sp),a6
  750.     move.l    (a6)+,d3
  751.     move.l    (a6)+,d2
  752.     move.l    (a6)+,d1
  753.     move.l    (a6)+,d0
  754.     move.l    (a6)+,a1
  755.     move.l    (a6)+,a0
  756.     move.l    _RTBase,a6
  757.     jsr       -$84(a6)
  758.     move.l    d0,$24(sp)
  759.     movem.l   (sp)+,d3/a6}
  760. END;
  761.  
  762. Function rtScreenToFrontSafely (screen: ScreenPtr): Integer;
  763.  
  764. begin
  765. {$A move.l    a6,-(sp)
  766.     move.l    $8(sp),a0
  767.     move.l    _RTBase,a6
  768.     jsr       -$8A(a6)
  769.     move.l    d0,$C(sp)
  770.     move.l    (sp)+,a6}
  771. END;
  772.  
  773. Function rtScreenModeRequestA
  774.          (screenmodereq: rtScreenModeRequesterPtr;
  775.           title: String;
  776.           taglist: ReqTagListPtr): Integer;
  777.  
  778. begin
  779. {$A movem.l   a3/a6,-(sp)
  780.     lea       $C(sp),a6
  781.     move.l    (a6)+,a0
  782.     move.l    (a6)+,a3
  783.     move.l    (a6)+,a1
  784.     move.l    _RTBase,a6
  785.     jsr       -$90(a6)
  786.     move.l    d0,$18(sp)
  787.     movem.l   (sp)+,a3/a6}
  788. END;
  789.  
  790. Function rtCloseWindowSafely (win: WindowPtr): Integer;
  791.  
  792. begin
  793. {$A move.l    a6,-(sp)
  794.     move.l    $8(sp),a0
  795.     move.l    _RTBase,a6
  796.     jsr       -$96(a6)
  797.     move.l    d0,$C(sp)
  798.     move.l    (sp)+,a6}
  799. END;
  800.  
  801. Function rtLockWindow (win: WindowPtr): Integer;
  802.  
  803. begin
  804. {$A move.l    a6,-(sp)
  805.     move.l    $8(sp),a0
  806.     move.l    _RTBase,a6
  807.     jsr       -$9C(a6)
  808.     move.l    d0,$C(sp)
  809.     move.l    (sp)+,a6}
  810. END;
  811.  
  812. Function rtUnlockWindow
  813.          (win: WindowPtr;
  814.           winlock: Address): Integer;
  815.  
  816. begin
  817. {$A move.l    a6,-(sp)
  818.     lea       $8(sp),a6    
  819.     move.l    (a6)+,a1
  820.     move.l    (a6)+,a0
  821.     move.l    _RTBase,a6
  822.     jsr       -$A2(a6)
  823.     move.l    d0,$10(sp)
  824.     move.l    (sp)+,a6}
  825. END;
  826.